package com.caesar.Abnormal;

/**
 * @author caesar
 * @date 2025/7/14
 * @Description:
 * @apiNote
 */
public class TestPerson {
    public static void main(String[] args) {
        try {
            Person p1 = new Person("张三", -5);
            System.out.println(p1);
        } catch (Exception e) {
            e.printStackTrace();
        }
        try {
            Person p2 = new Person("李四", 5);
            System.out.println(p2);
        } catch (Exception e) {
            e.printStackTrace();
        }

        Person p3 = new Person();
        p3.setName("王五");
        try {
            p3.setLifeValue(5);
        } catch (Exception e) {
            e.printStackTrace();
        }
        try {
            p3.setLifeValue(-5);
        } catch (Exception e) {
            e.printStackTrace();
        }
        System.out.println(p3);
    }
}
